package com.woniu.gym.client;

import com.woniu.core.util.Result;
import com.woniu.gym.client.dto.CoachDto;
import com.woniu.gym.client.dto.CoachInfoDto;
import com.woniu.gym.client.dto.GetUserInfoByIdDTO;
import com.woniu.gym.client.dto.GymAccountDto;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient(value = "account-server" ,path= "/account")
public interface AccountServerClient {
    @GetMapping("/tCoachInfo/CoachInfoById/{coachId}.coach")
    @ApiOperation("根据教练id查询简历")
    public Result<CoachInfoDto> CoachInfoById(@PathVariable("coachId") Integer coachId);

    @ApiOperation("根据id查询教练账号信息")
    @GetMapping("/tCoach/getCoachAccountInfoById/{coachId}.coach")
    public Result<CoachDto> getCoachAccountById(@PathVariable("coachId") Integer coachId);

    @ApiOperation("根据coachId绑定签约的场馆")
    @PostMapping("/tCoach/coachBindGym/{coachId}/{gymNum}.coach")
    public Result<CoachDto> coachBindGym(@PathVariable("coachId") Integer coachId,@PathVariable("gymNum") String gymNUm);

    @GetMapping("/tGymAccount/findGymAccountById/{gymId}.gym")
    @ApiOperation("根据gymId查询场馆账号信息")
    public Result<GymAccountDto> findGymAccountById(@PathVariable("gymId") Integer gymId);

    @ApiOperation("根据coachId解绑场馆")
    @PostMapping("/tCoach/coachUntieGym/{coachId}.coach")
    public Result<CoachDto> coachUntieGym(@PathVariable("coachId") Integer coachId);

    @ApiOperation("根据id查询用户信息")
    @GetMapping("/tUserInfo/getUserInfoById/{id}.api")
    public Result<GetUserInfoByIdDTO> getUserInfoById(@PathVariable("id") Integer id);
}
